<template>
  <div class="cominfo">
    <!-- 头部+主体信息 -->
    <CompanyInfo v-model="isDel"></CompanyInfo>
    <!-- 面试评价区域 -->
    <CompanyCom v-if="isDel"></CompanyCom>
    <!-- 底部区域 -->
    <div class="footer">
      <span @click="positionClick">在招职位 <i class="i1">1</i></span>
      <span @click="postTip">企业面试题 <i class="i2">2</i></span>
    </div>
  </div>
</template>

<script>
import CompanyInfo from './components/companyInfo.vue'
import CompanyCom from './components/companyCom.vue'
import { mapState } from 'vuex'
export default {
  name: 'ComInfo',
  components: {
    CompanyInfo,
    CompanyCom
  },
  data () {
    return {
      isDel: false
    }
  },
  computed: {
    ...mapState('companyDetail', ['detailList'])
  },
  methods: {
    positionClick () {
      this.$router.push(
        '/companyPosition?oldurl=' +
          this.$route.fullPath +
          '&id=' +
          this.detailList.id
      )
    },
    postTip () {
      // console.log('this.$route: ', this.$route)
      this.$router.push('/questions?companyId=' + this.$route.params.id)
    }
  }
}
</script>

<style lang="less" scoped>
.cominfo {
  width: 100%;
  height: 100%;

  // 底部区域
  .footer {
    z-index: 500;
    width: 100%;
    height: 150px;
    box-shadow: 10px 20px 20px 30px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #fff;
    span {
      display: inline-block;
      width: 332px;
      height: 88px;
      border: 2px solid #b4b4bd;
      border-radius: 16px;
      font-size: 28px;
      color: #181a39;
      text-align: center;
      line-height: 88px;
      position: relative;
      .i1,
      .i2 {
        position: absolute;
        top: -15px;
        left: 220px;
        display: flex;
      }
      .i2 {
        left: 240px;
      }
    }
  }
}
</style>
